package com.iptv.grape.event.imp;

import android.view.View;

import com.iptv.grape.BaseActivity;
import com.iptv.grape.bu.GrapeContext;
import com.iptv.grape.event.EventArgs;
import com.iptv.grape.event.JSRequest;
import com.iptv.grape.event.proc.IWebViewMessageProc;
import com.iptv.grape.util.AppLog;
import com.iptv.grape.video.XMediaPlayer;

import org.greenrobot.eventbus.EventBus;
// 关闭小窗口
public class CloseLiveWindow implements IWebViewMessageProc {
    @Override
    public void init(JSRequest jsRequest) {

    }

    @Override
    public String procMessage(BaseActivity baseActivity, XMediaPlayer mediaPlayer) {
        AppLog.getCurLog().out("mediaPlayer.stop");
        mediaPlayer.stop();
        mediaPlayer.hiddView();
        GrapeContext.curGrapeContext().setPlaying(false);
        return "";
    }
}
